<div class="row">
    <div class="span3 bs-docs-sidebar ">
    <*include file="<*$controller*>/location.tpl"*>
    </div>
  <link rel="stylesheet" href="/css/lightbox.css" media="screen"/>
	<style type="text/css">
	li.open{  background:#aceeff;}
	.weibo{ font-size:14px; text-align:left; margin:0px; margin-bottom:30px; list-style:none;}
	.weibo li { margin-left:0px;  padding:10px;  border-top:1px solid #CCC;}
	.weibo_content .title .titles{ font-weight:bolder; font-size:14px;}
	.weibo_content .content{ padding-top:5px; padding-bottom:5px; line-height:1.5em;}
	.weibo_content .picture{ padding-bottom:10px;}
	.weibo_content .detailed .time{ margin-right:5px; color:#000;}
	.weibo_content .detailed .object{  text-align:center; width:20px;color:#000;}
	.weibo_content .detailed .pinglun{  text-align:center; width:20px;color:#000;}
	.weibo_content .detailed .zan{ text-align:center; width:20px;color:#000;}
	.weibo_content .detailed .come a{color:#000;}
	.example-image{ margin-right:1px;}
	</style> 
    <*if $groupid*>
        <div class="span4" <*if $schoolid*>style="display:none;"<*/if*>> 
            <div style="clear:both; padding-top:20px;"><*$page*></div>
            <table class="table table-bordered table-hover" style="cursor:pointer; margin-top:15px; margin-left:20px;" >
                <tr><th>学校名称</th></tr>
                <*foreach from=$school item=m key=y*>
                <tr onclick="chooseit(<*$m.schoolid*>,<*$groupid*>)"><td><*$m.schoolname*></td></tr>
                <*/foreach*>
            </table>
            <div style="clear:both; padding-top:10px; "><*$page*></div>
        </div>
    <*/if*>
    
    <*if $schoolid*>
<div class="span7" <*if $schoolid*>style="display:block;"<*else*>style="display:none;"<*/if*>> 
        <div class="span8" style="margin-bottom:20px;">
            <button type="button" class="btn btn-primary" onclick="window.location='/<*$controller*>/<*$action*>/groupid/<*$groupid*>'">返回已发布日志学校列表</button>
            <button type="button" class="btn btn-primary" onclick="window.location='/video/check/groupid/<*$groupid*>'">返回待审核视频</button>
        </div>
        
        <div class="span7"><*$schoolname*>&nbsp;&nbsp;<*$classname*></div>
          <form action="/<*$controller*>/<*$action*>/groupid/<*$groupid*>/schoolid/<*$schoolid*>" method="get" >
                <div class="span3" style="float:left;">
                    <select name="uid_class" id="uid_class" style=" float:left;width:300px; margin-top:20px; z-index:200;"> 
                        <option value="">---选择班级---</option> 
                        <*foreach from =$class item=a key=k*>
                        <option value="<*$a.uid*>" <*if $uid==$k*> selected<*/if*>><*$a.classname*></option> 
                        <*/foreach*>
                    </select>
                </div>
                <div class="span3" style="float:left; margin-top:21px; padding-left:10px;">
                    <button type="submit" class="btn btn-primary btn-small" >查询</button>
                </div>
				<*if !$uid_class*><div style="clear:both; margin-left:30px; padding-top:20px;">请选择班级！</div><*/if*>        
          </form>
        </div>
    <*/if*>
    <div class="span6">
    <*if $articlelist|@count neq 0*>
            <ul class="weibo">
              <li style="border-top:none;"><*$page*></li>
			  <*foreach from=$articlelist item=item key =key name=foo*> 
            	<li onmouseout="document.getElementById('deletepic_<*$item.articleid*>').style.display='none';" onmouseover="document.getElementById('deletepic_<*$item.articleid*>').style.display='block';">
                	<div class="weibo_content">
                    	<div class="title"><span class="titles"><!--<img src="/images/mobile_bg.png" style="height:20px;"/>--><*$item.title*></span>
                        <span title="删除此动态" id="deletepic_<*$item.articleid*>" style=" display:none;float:right;"><a href="javascript:deleteit(<*$item.articleid*>,<*$groupid*>,<*$schoolid*>,<*$uid_class*>,<*$pagenum*>)"><img src="/images/xiao_close.png" /></a></span>
                        </div>
                        <div class="content" ><*$item.content*></div>
                        <div class="picture">
                              <*if $item.filecount*>
                                <*foreach from=$item.filecount item=item1 key =key1 *>
                                <*if $item1.fext <> 'mp4'*>
                                    <div style="position:relative;float:left; padding:5px 5px 0px 0px; margin:0px 8px 8px 0px;">
                                        <a class="example-image-link" href="<*$item1.avatar*>.small.jpg" data-lightbox="example-set" >
                                            <img  class="example-image" src="<*$item1.avatar*>.tiny.jpg" width="75" />
                                        </a>
                                    </div>
                                <*else*>
                                	<!--href="/<*$controller*>/articlelistshowvideo/groupid/<*$groupid*>/uid_class/<*$uid_class*>/articlefilesid/<*$item1.articlefilesid*>"-->
                                    <!--<a title="<a href='<*$item1.avatar*>' target='_blank'>点此链接下载</a>"> -->
                                    	<a href="<*$item1.avatar*>" >
                                        <div style="position:relative; cursor:pointer"  id="img<*$item1.articlefilesid*>">
                                        	<img src="<*$item1.avatar*>.jpg" />
                                        	<span style="position:absolute; background:url('/img/bigplay.png') no-repeat; background-position:24px 0px;width:150px;height:100px;top:33px;left:0px" ></span>
                                        </div>
                                        </a>
                                    <!--</a> -->
<!--                <div id="video<*$item1.articlefilesid*>" style="display:none">
					<script src="/js/jquery.js"></script>	
                    <script src="/js/mediaelement-and-player.min.js"></script>
                    <script src="/js/testforfiles.js"></script>	
                    <link rel="stylesheet" href="/css/mediaelementplayer.min.css" />    
                    <link rel="stylesheet" href="/css/mejs-skins.css" />
                    
                    <div style="margin-top:10px; margin-bottom:10px;">
                    <video class="mejs-wmp" width="440" height="360" src="<*$item1.avatar*>" type="video/mp4" 
                        id="player1" poster="<*$item1.avatar*>.jpg" 
                        controls="controls" preload="none"></video>
                    </div>
                    <script type="text/javascript">
                    $('audio,video').mediaelementplayer({
                        success: function(player, node) {
                            $('#' + node.id + '-mode').html('mode: ' + player.pluginType);
                        }
                    });                    
                    </script>
                </div>                               
-->								<*/if*>
                                
                                <*/foreach*>	
                             <*else*>
                             	<span>没有图片！</span>
                             <*/if*>
                        </div>
                        <div style="clear:both;"></div>
                        <div class="detailed clearfix">
                        	<span class="time"><*$item.addtime*></span>
                            &nbsp;&nbsp;来自&nbsp;<span class="come" style="color:#F66; text-decoration:none;"><*$classname*></span>
<!--                            &nbsp;&nbsp;分类&nbsp;<span class="come" style="color:#F66; text-decoration:none;">
-->                            <!--<*eval var=$item.photosetid assign="id"*>-->
                            <*if $item.tag neq ''*><*$item.tag*><*elseif $item.schedule*><*$item.schedule*><*else*>无<*/if*></span>
                            
                            
                            <div style="float:right">
<!--                                <a role="button" class="btn btn-primary btn-small" data-toggle="modal" onclick="javascript:editit(<*$item.articleid*>,<*$groupid*>,<*$schoolid*>,<*$uid_class*>,<*$pagenum*>)"><i class="icon-pencil icon-white"> </i> 修改</a>
-->
                                <a <*if count($item.people) eq 0*>href="#"<*else*>href="#myModal" onclick="javascript:seeit('<*$item.name*>')"<*/if*> role="button" class="btn btn-primary btn-small" data-toggle="modal"><i class="icon-user icon-white"></i> <*count($item.people)*></a>				
                        	</div>
                    	</div>
<!--                        <div class="detailed clearfix">
                        <div style="float:left; width:20px;"><img src="/images/picture.jpg" width="15" /></div>
                        <div style="float:left; width:490px;"><*$item.recievername*></div>
                        </div>
-->                </li>
              <*/foreach*>
              <li><*$page*></li>
            </ul>
    
    <*/if*>
	<*if !$articlelist && $uid_class*><div style="clear:both; margin-left:130px; padding-top:20px;">暂时没有已发布的日志！</div><*/if*>  
</div>
</div>
<script src="/js/lightbox-2.6.min.js"></script>
<script src="/js/bootstrap-modal.js"></script>
<!-- Modal -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">接收对象列表</h3>
  </div>
  <div class="row">
  <div class="modal-body span5">
       <div id="show" style="padding:50px 5px;"></div>
  </div>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
  </div>
</div>
</div>
<script src="/js/jquery-1.4.1.min.js"></script>

<script type="text/javascript">

function showvideo(adid)
{
   $("#img"+adid).hide();
   $("#video"+adid).show();
}

function chooseit(adid,groupid,schoolname)
{
   window.location='/<*$controller*>/<*$action*>/schoolid/'+adid+'/groupid/'+groupid;
}

function seeit(adid)
{
	$("#show").html(adid);
}


function deleteit(adid,gid,sid,cid,page)
{
  if(confirm("删除将不能恢复")){
   window.location='/<*$controller*>/deletearticle/adid/'+adid+'/groupid/'+gid+'/sid/'+sid+'/cid/'+cid+'/page/'+page;
  }
}

function editit(adid,gid,sid,cid,page)
{
   window.location='/<*$controller*>/editarticle/adid/'+adid+'/groupid/'+gid+'/sid/'+sid+'/cid/'+cid+'/page/'+page;
}

</script>

